/*
** 1207.c
** 
** Made by (seakage2h)
** Login   <seakage2h@seakage2h-ubuntu>
** 
** Started on  Tue Sep 30 22:02:06 2008 seakage2h
** Last update Sun May 12 01:17:25 2002 Speed Blue
*/

/* #include "1207.h" */
#include <stdio.h>

int main()
{
     int a1, a2, l, r;
     int i, tmp, count, max;

     while(scanf("%d%d", &a1, &a2) != EOF){
	  if (a1 > a2)
	       l = a2, r = a1;
	  else
	       l = a1, r = a2;
	  max = 0;
	  for(i = l; i <= r; i++){
	       tmp = i;
	       count = 1;
	       while(tmp != 1){
		    if (tmp % 2)
			 tmp = 3 * tmp + 1;
		    else
			 tmp = tmp >> 1; /* divide by 2 */
		    count++;
	       }
	       if (count > max)
		    max = count;
	  }
	  printf("%d %d %d\n", a1, a2, max);
     }
     return 0;
}

